﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace B303Langf.Parser.AST
{
   public class BinaryExpression : Expression
   {
      public BinaryExpression( Expression leftPrimary, Operator op, Expression rightPrimary )
      {
         LeftPrimary = leftPrimary;
         Operator = op;
         RightPrimary = rightPrimary;
      }

      public Expression LeftPrimary
      {
         get;
         private set;
      }

      public Expression RightPrimary
      {
         get;
         private set;
      }

      public Operator Operator
      {
         get;
         private set;
      }

      public override object Visit( IVisitor v, object obj )
      {
         return v.VisitBinaryExpression( this, obj );
      }
   }
}
